Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove duplicate index urls #468

Merged
merged 3 commits into from
Mar 24, 2017

Conversation

majuscule
Copy link
Contributor

closes issue #316

@@ -143,6 +143,8 @@ def cli(verbose, dry_run, pre, rebuild, find_links, index_url, extra_index_url,
repository = LocalRequirementsRepository(existing_pins, repository)

log.debug('Using indexes:')
# remove duplicate index urls before processing
repository.finder.index_urls = sorted(set(repository.finder.index_urls))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

As it is, this has the possibility of changing the index-url order, which is a property that needs to be maintained.

As a user, I might use index urls to explicitly set desired index usage ( A -> B -> C ).

See http://stackoverflow.com/a/39835527/28275 for a clean reference implementation that keeps order.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine by me. I have pushed an update with the collections implementation as per your link.

@davidovich davidovich merged commit f323b92 into jazzband:master Mar 24, 2017
@davidovich
Copy link
Contributor

Thanks for this @majuscule

@majuscule
Copy link
Contributor Author

Happy to help! If you have time, I would appreciate your thoughts on my comment to you here: #418 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants